#!/bin/bash
# set -e

sed -i 'ListenAddress 127.0.0.1/g' /etc/ssh/sshd_config
sed -i 'PidFile /config/sshd.pid' /etc/ssh/sshd_config
sed -i 'AuthorizedKeysFile .ssh/authorized_keys' /etc/ssh/sshd_config
sed -i 'Subsystem sftp /usr/lib/ssh/sftp-server -u 022' /etc/ssh/sshd_config

sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
sed -i 's/GatewayPorts yes/GatewayPorts no/g' /etc/ssh/sshd_config
sed -i 's/X11Forwarding yes/X11Forwarding no/g' /etc/ssh/sshd_config
